{% load static %}
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="../static/ckeditor/ckeditor/ckeditor.js" type="text/javascript" charset="utf-8"></script>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link href="../static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <link href="../static/css/cl-css.css" rel="stylesheet">
        <link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
        <link rel="stylesheet" href="../static/highlight/styles/railscasts.css">
	</head>
	<body>
        <div class="cl-cantainer container pt-5">
            <form class="col-md-10 offset-md-1" method="post" enctype="multipart/form-data">

                <div class="cl-header container-fluid">
                    <div class="header-content container">
                        <nav class="navbar navbar-expand-lg navbar-light">
                             <a class="navbar-brand" href="index.html">
                <img src="https://static.allhistory.com/online/common/img/logo-ah.1598.svg" width="144" height="72" alt="">
            </a>
            <h2>全历史</h2>
                            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
                                    aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                                <span class="navbar-toggler-icon"></span>
                            </button>
                            <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
                                <ul class="navbar-nav">
                                    <li class="nav-item active">
            {#                            <a class="nav-link" href="../static/calmlog-index.html">首页 <span class="sr-only">(current)</span></a>#}
                                    </li>
                                    <li class="nav-item">
            {#                            <a class="nav-link" href="#">教程</a>#}
                                    </li>
                                    <li class="nav-item">
            {#                            <a class="nav-link" href="#">模板</a>#}
                                    </li>
                                    <li class="nav-item">
            {#                            <a class="nav-link" href="#">日记</a>#}
                                    </li>
                                    <li class="nav-item">
            {#                            <a class="nav-link" href="#">关于</a>#}
                                    </li>
                                </ul>
                            </div>
                        </nav>
                    </div>
                </div>
                <!-- avatar -->
                {% csrf_token %}
                        <div class="form-group" >
                            <label for="avatar">标题插图</label>
                            <input type="file" class="form-control-file" name="avatar" id="avatar">
                        </div>
                    <div class="form-group">
                            <label for="phone">文章标题</label>
                            <input type="text" class="form-control" id="title" name="title">
                    </div>
                    <div class="form-group">
                            <label for="phone">栏目</label>
                            <select class="form-control" height="72" name="category">
                                {% for  foo in list %}
                                    <option value="{{ foo.id }}">{{ foo.title }}</option>
                                {% endfor %}
                            </select>
                    </div>
                    <div class="form-group">
                            <label for="phone">标签</label>
                            <input type="text" class="form-control" id="tags" name="tags">
                    </div>
                    <div class="form-group">
                            <label for="phone">文章摘要</label>
                            <input type="text" class="form-control" id="phone" name="sumary">
                    </div>
                        <!-- desc -->
                    <textarea name="content" id="editor1" rows="10" cols="80" >

                     </textarea>
                    <script>
                        // Replace the <textarea id="editor1"> with a CKEditor 4
                        // instance, using default configuration.
                        CKEDITOR.replace('editor1');
                    </script>
                <button type="submit" class="btn btn-primary" style="margin-left: 12px" href="{% url 'home:index' %}">完成</button>
        </form>
        {% csrf_token %}
    </body>
</html>
